/*
 ------------------------------------------------------------------------------
 Copyright (C) 2013 Eternal Games.

 This file is part of the EternalTech source code.

 The EternalTech source code is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your
 option) any later version.

 The EternalTech source code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.

 You should have received a copy of the GNU General Public License along with
 the EternalTech source code; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 ------------------------------------------------------------------------------
*/


//
// entFile.h - entity file parsing and writing
//


#ifndef __GAME_ENTFILE_H__
#define __GAME_ENTFILE_H__


#define MAX_ENT_ENTITIES				4096

struct entEntity_t {
	bool					used;

	etDict					dict;
};

class etEntFile {
private:
	int						numEntities;
	entEntity_t				entities[MAX_ENT_ENTITIES];

public:
							etEntFile ();
							~etEntFile ();

	void					Clear ();

	bool					Parse (const char *name);
	bool					Write (const char *name) const;

	void					AddEntity (const etDict &dict);
	void					RemoveEntity (const char *name);
	void					RemoveEntities (const char *className);
	void					RemoveAllEntities ();
};


#endif	// __GAME_ENTFILE_H__